//
//  Extension+UIIable.swift
//  WeiBo
//
//  Created by macbook on 16/10/19.
//  Copyright © 2016年 buWangChuXing. All rights reserved.
//

import UIKit

extension UILabel
{
    convenience init(textColor:UIColor,textFont:CGFloat,labelWith:CGFloat = 0) {
        self.init()
        //设置字体颜色
        self.textColor = textColor
        
        self.font = UIFont.systemFontOfSize(textFont)

        if labelWith > 0 {
            
            self.numberOfLines = 0;
            self.preferredMaxLayoutWidth = labelWith
        }
    }
}
